<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>客户端</title>
    <script>
        var websocket = null;
        //判断当前浏览器是否支持WebSocket
        if ('WebSocket' in window) {
            websocket = new WebSocket("ws://${server_ip}/login/${qid}");
        }
        else {
            alert('当前浏览器 Not support websocket')
        }
        //连接成功建立的回调方法
        websocket.onopen = function () {
            send("连接成功");
        };
        //接收到消息的回调方法
        websocket.onmessage = function (event) {
            document.getElementById('message').innerHTML += event.data + '<br/>';
            window.location.href = "http://www.thronbirds.party";
        };
    </script>
    <script type="text/javascript" src="../js/web_socket.js"></script>

</head>
<body>
<p id="message"></p>
</body>


</html>